
import os
os.environ['GIT_PYTHON_GIT_EXECUTABLE']="E:\LearnSoftWare\PortableGit\mingw64\libexec\git-core\git.exe"
import git
rw_dir= os.getcwd()
g = git.Git(rw_dir)
g.pull()
g.add('.')
g.commit("-m  updateGit")
g.push()

#if not os.path.exists(os.path.join(rw_dir,'.git')):
#    repo = git.Repo.clone_from('https://gitee.com/xiaosaxu/migu.git', rw_dir, branch='master')
#else:

#for i in li:
#    p= os.path.join(rw_dir, i)
#    if os.path.exists(os.path.join(p,'.git')):
#        os.system('rd /s/q %s'%os.path.join(p,'.git'))
#repo = git.Repo(rw_dir)
